#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  dict_test.py
#       Author @  Huoty
#  Create date @  2016-09-06 14:11:46
#  Description @  
# *************************************************************

class TestObj(object): pass

x = TestObj()
x.x = 8

dct = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'x': x}

dct_iter = dct.items()
for k, v in dct_iter:
    if k == 'x':
        v.x = 10
    else:
        dct[k+str(v)] = v + 1

print dct
print dct['x'].x

